/**
 * 
 */
package org.insia.smartposse.metier;

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import org.insia.smartposse.metier.webservice.LightProject;

/**
 * @author raguerri
 *
 */
public class Project 
implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2894608718788802034L;
	private long _id = -1L;
	private long _budget;
	private String _title;
	private Date _start_date;
	private Date _end_date;
	private String _description;
	private User _creator;
	private String _url;
	
	private Set<CategoryTheme> _projectCategory = new HashSet<CategoryTheme>();
	private Set<ProjectSkill> _projectSkills = new HashSet<ProjectSkill>();

	/**
	 * Empty constructor.
	 *
	 */
	public Project() {
	}
	
	/**
	 * Constructor.
	 *
	 */
	public Project (long id, long budget, String title, Date start_date, Date end_date, String description, User creator, String url) {
		this._id = id;
		this._budget = budget;
		this._title = title;
		this._start_date = start_date;
		this._end_date = end_date;
		this._description = description;
		this._creator = creator;
		this._url = url;
	}
	
	public void setParams (long id, long budget, String title, Date start_date, Date end_date, String description, User creator, String url) {
		this._id = id;
		this._budget = budget;
		this._title = title;
		this._start_date = start_date;
		this._end_date = end_date;
		this._description = description;
		this._creator = creator;
		this._url = url;		
	}
	/**
	 * @return the _budget
	 */
	public long getBudget() {
		return _budget;
	}

	/**
	 * @param _budget the _budget to set
	 */
	public void setBudget(long budget) {
		this._budget = budget;
	}

	/**
	 * @return the _company
	 */
	public User getCreator() {
		return _creator;
	}

	/**
	 * @param _company the _company to set
	 */
	public void setCreator(User creator) {
		this._creator = creator;
	}

	/**
	 * @return the _description
	 */
	public String getDescription() {
		return _description;
	}

	/**
	 * @param _description the _description to set
	 */
	public void setDescription(String description) {
		this._description = description;
	}

	/**
	 * @return the _end_date
	 */
	public Date getEnd_date() {
		return _end_date;
	}

	/**
	 * @param _end_date the _end_date to set
	 */
	public void setEnd_date(Date end_date) {
		this._end_date = end_date;
	}

	/**
	 * @return the _id
	 */
	public long getId() {
		return _id;
	}

	/**
	 * @param _id the _id to set
	 */
	public void setId(long id) {
		this._id = id;
	}


	/**
	 * @return the _projectSkills
	 */
	public Set<ProjectSkill> getProjectSkills() {
		return _projectSkills;
	}

	/**
	 * @param skills the _projectSkills to set
	 */
	public void setProjectSkills(Set<ProjectSkill> skills) {
		_projectSkills = skills;
	}

	/**
	 * @return the _start_date
	 */
	public Date getStart_date() {
		return _start_date;
	}

	/**
	 * @param _start_date the _start_date to set
	 */
	public void setStart_date(Date start_date) {
		this._start_date = start_date;
	}

	/**
	 * @return the _title
	 */
	public String getTitle() {
		return _title;
	}

	/**
	 * @param _title the _title to set
	 */
	public void setTitle(String title) {
		this._title = title;
	}

	/**
	 * @return the _url
	 */
	public String getUrl() {
		return _url;
	}

	/**
	 * @param _url the _url to set
	 */
	public void setUrl(String url) {
		this._url = url;
	}
	
	public LightProject setLight() {
		LightProject lproject = new LightProject(this);
		return lproject;
	}

	/**
	 * @return the category
	 */
	public Set<CategoryTheme> getProjectCategory() {
		return _projectCategory;
	}

	/**
	 * @param category the category to set
	 */
	public void setProjectCategory(Set<CategoryTheme> category) {
		this._projectCategory = category;
	}

}
